package edu.bailie.mybatis.mapper;

import edu.bailie.mybatis.pojo.Car;
import edu.bailie.mybatis.pojo.CarExample;
import edu.bailie.mybatis.utils.SqlSessionUtil;
import org.apache.ibatis.session.SqlSession;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository("carMapperImpl")
public class CarMapperImpl implements CarMapper{
	@Override
	public long countByExample(CarExample example) {
		return 0;
	}

	@Override
	public int deleteByExample(CarExample example) {
		return 0;
	}

	@Override
	public int deleteByPrimaryKey(Long id) {
		return 0;
	}

	@Override
	public int insert(Car row) {
		return 0;
	}

	@Override
	public int insertSelective(Car row) {
		return 0;
	}

	@Override
	public List<Car> selectByExample(CarExample example) {
		SqlSession sqlSession = SqlSessionUtil.openSession();
		CarMapper mapper = sqlSession.getMapper(CarMapper.class);
		List<Car> cars = mapper.selectByExample(null);
		return cars;
	}

	@Override
	public Car selectByPrimaryKey(Long id) {
		return null;
	}

	@Override
	public int updateByExampleSelective(Car row, CarExample example) {
		return 0;
	}

	@Override
	public int updateByExample(Car row, CarExample example) {
		return 0;
	}

	@Override
	public int updateByPrimaryKeySelective(Car row) {
		return 0;
	}

	@Override
	public int updateByPrimaryKey(Car row) {
		return 0;
	}
}
